import java.util.LinkedList;
import java.util.List;
import java.util.Objects;

/**
 * Created by patrick on 9/7/2017.
 */
public class Test {
    public static void main(String[] args) {
        List<ScoreTreeNode> list = new LinkedList<ScoreTreeNode>();

        ScoreTreeNode d1 = new ScoreTreeNode("01");
        d1.setParentId(null);
        d1.setNodeName("填报材料总体评价（5分）");
        d1.setLevel(1);
        d1.setOrderNo(1);
        d1.setColumnsCount(2);


        ScoreTreeNode d2 = new ScoreTreeNode("010001");
        d2.setParentId("01");
        d2.setNodeName("填报材料内容详实充分，编制思路清晰，规范性逻辑性非常强");
        d2.setLevel(3);
        d2.setOrderNo(1);
        d2.setColumnsCount(1);

        ScoreTreeNode d3 = new ScoreTreeNode("010002");
        d3.setParentId("01");
        d3.setNodeName("填报材料内容较为详实，编制思路较为清晰，规范性逻辑性较强");
        d3.setLevel(3);
        d3.setOrderNo(2);
        d3.setColumnsCount(1);

        ScoreTreeNode d4 = new ScoreTreeNode("010003");
        d4.setParentId("01");
        d4.setNodeName("填报材料内容较为简化，编制思路不清晰，规范性逻辑性较差");
        d4.setLevel(3);
        d4.setOrderNo(3);
        d4.setColumnsCount(1);

        ScoreTreeNode d5 = new ScoreTreeNode("02");
        d5.setParentId(null);
        d5.setNodeName("依托单位情况（20分）");
        d5.setLevel(1);
        d5.setOrderNo(2);
        d5.setColumnsCount(1);

        ScoreTreeNode d6 = new ScoreTreeNode("0201");
        d6.setParentId("02");
        d6.setNodeName("装备研制单位（10分）");
        d6.setLevel(2);
        d6.setOrderNo(1);
        d6.setColumnsCount(1);

        ScoreTreeNode d7 = new ScoreTreeNode("0202");
        d7.setParentId("02");
        d7.setNodeName("业主单位（10分）");
        d7.setLevel(2);
        d7.setOrderNo(2);
        d7.setColumnsCount(1);

        ScoreTreeNode d8 = new ScoreTreeNode("020101");
        d8.setParentId("0201");
        d8.setNodeName("业界影响力强，同类产品技术水平处于行业领先地位");
        d8.setLevel(3);
        d8.setOrderNo(1);
        d8.setColumnsCount(1);


        list.add(d1);
        list.add(d2);
        list.add(d3);
        list.add(d4);
        list.add(d5);
        list.add(d6);
        list.add(d7);
        list.add(d8);




        ScoreTreeNode root1 = new ScoreTreeNode(null);

        TreeNodeHelper treeNodeHelper = new TreeNodeHelper();
        ScoreTreeNode root = (ScoreTreeNode)treeNodeHelper.transferList(list, root1);
        treeNodeHelper.setAllRowsCount(root);
        System.out.println("<tr>"+treeNodeHelper.genTable(root.getChildList()));

        System.out.println(list);

        String str = "start";
        for(int i=0; i<100; i++){
            str = str + "hello";
        }
    }
}
